home *** CD-ROM | disk | FTP | other *** search
/ PC Format 25 / PCFormat 1993-10.iso / READER.ZIP / EXAMPLE.BAS next >
BASIC Source File  |  1993-05-29  |  540b  |  32 lines

  1. DECLARE SUB fu ()
  2. DECLARE SUB igraphics ()
  3. COMMON SHARED c, px1, px2, py1, py2
  4. DIM SHARED sprite(300)
  5. igraphics
  6.  
  7. SUB fu
  8. INPUT #1, px1
  9. INPUT #1, px2
  10. INPUT #1, py1
  11. INPUT #1, py2
  12. FOR c = px1 TO px2
  13. FOR c2 = py1 TO py2
  14. INPUT #1, a
  15. LINE (c, c2)-(c, c2), a
  16. NEXT c2
  17. NEXT c
  18. END SUB
  19.  
  20. SUB igraphics
  21. SCREEN 9
  22. PRINT "Press a key to begin Initialising Graphics, WARNING, this may take some time."
  23. DO UNTIL INKEY$ <> ""
  24. LOOP
  25. CLS
  26. OPEN "GRAPHICS.DAT" FOR INPUT AS #1
  27. fu
  28. GET (px1, py1)-(px2, py2), sprite(1)
  29. CLOSE #1
  30. END SUB
  31.  
  32.